import java.io.*;
import java.util.*;
public class Main{
    public static void main(String[]args){
        Scanner cin = new Scanner(System.in);
        int n = cin.nextInt();
        int a[] = new int[n+1];
        for(int i=1; i<=n; i++){
            a[i] = cin.nextInt();
            int now = 0;
            for(int j=1; j<i; j++){
                now += a[j]<a[i] ? 1 : 0;
            }
            System.out.print(now+(i==n?"\n":" "));
        }
    }
}